<div class="boxModule">
    <div class="folder-title">
        <h3><span>Danh mục</span></h3>
    </div>
    <!-- End Orange Title -->
    <div class="MenuBox-cont">
        <ul class="categories">
            <?php foreach ($hierarchyCategories as $category) { ?>
            <li><a href="<?php echo Link::build('product/bycategory', $category, 'product_category_id'); ?>"><span><b><?php echo $category['name']; ?></b></span></a></li>
                <?php if (!empty($category['children'])) { ?>
                <ul class="sub-categories">
                    <?php foreach ($category['children'] as $childCategory) { ?>
                    <li><a href="<?php echo Link::build('product/bycategory', $childCategory, 'product_category_id'); ?>"><span><?php echo $childCategory['name']; ?></span></a></li>
                    <?php } ?>
                </ul>
                <?php } ?>
            <?php } ?>
        </ul>
        <!-- End Categories -->
    </div>
    <!-- End BoxModule Content -->
</div>